<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <h2>函数的默认值</h2>
</body>
<script>

    /*
    //ES6
    let getInfo=function(title='我是默认标题',content='内容区') {
        console.log(title)
        console.log(content)
    }
    */

     //ES5时代
    let getInfo=function(title,content) {
        title=title || '我是默认标题111'  
        content=content || '内容区111'
        console.log(title)
        console.log(content)
    }

    getInfo('我是前端开发工程师')
</script>
</html>